package com.kikcn.demo.services;

import com.kikcn.demo.dao.RoleRepository;
import com.kikcn.demo.domain.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by kikcn on 2015/4/18.
 */
@Service
@Transactional
public class RoleService {
    @Autowired
    private RoleRepository roleRepository;
    @Transactional(readOnly = true)
    public List<Role> findAll(){
        return roleRepository.findAll();
    }
}
